from django.conf import settings
from blog.models import *
import datetime 

def blog(request):
	#archiwum
	date1 = datetime.datetime.now().date() - datetime.timedelta(days=30)
 	date2 =  datetime.datetime.now().date() - datetime.timedelta(days=60)
	date3 =  datetime.datetime.now().date() - datetime.timedelta(days=90)
	rok1 = date1.year
	rok2 = date2.year
	rok3 = date3.year
	miesiac1 = "%02d" % date1.month
	miesiac2 = "%02d" % date2.month
	miesiac3 = "%02d" % date3.month

	return { 
                      "tagi":Tag.objects.all().order_by('nazwa'), 
                      "kategorie":Kategoria.objects.all().order_by('nazwa'),

		      "date1":date1,
 		      "date2":date2,
		      "date3":date3,
		      "rok1":rok1,
		      "rok2":rok2,
		      "rok3":rok3,
		      "miesiac1":miesiac1,
		      "miesiac2":miesiac2,
		      "miesiac3":miesiac3,

		      "wielkosc" :['tag-big strong','strong','tag-norma'],
                   }
